<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{% block title %}跑团对战工具{% endblock %}</title>
    <!-- Element Plus CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    <header>
        <nav>
            {% if user.is_authenticated %}
                <a href="{% url 'battle:home' %}">首页</a>
                <a href="{% url 'battle:character_list' %}">角色</a>
                <a href="{% url 'battle:template_list' %}">模板</a>
                <a href="{% url 'accounts:profile' %}">个人资料</a>
                <a href="{% url 'accounts:logout' %}">登出</a>
            {% else %}
                <a href="{% url 'accounts:login' %}">登录</a>
                <a href="{% url 'accounts:register' %}">注册</a>
            {% endif %}
        </nav>
    </header>

    <main>
        {% if messages %}
        <div class="messages">
            {% for message in messages %}
            <div class="message {{ message.tags }}">
                {{ message }}
            </div>
            {% endfor %}
        </div>
        {% endif %}

        {% block content %}
        {% endblock %}
    </main>

    <footer>
        <p>&copy; 2024 跑团对战工具</p>
    </footer>

    <!-- Vue 3 -->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <!-- Element Plus -->
    <script src="https://unpkg.com/element-plus"></script>
    <!-- Element Plus Icons -->
    <script src="https://unpkg.com/@element-plus/icons-vue"></script>
    <!-- 自定义JS -->
    {% block extra_js %}{% endblock %}
</body>
</html> 